# -*- coding: utf-8 -*-

from Crypto.PublicKey import RSA
from Crypto import Random


def generate_RSA(bits=2048):
    key = RSA.generate(2048)
    private_key = key.exportKey(pkcs=1)
    public_key = key.publickey().exportKey('OpenSSH')
    return private_key, public_key